const mixin = require("../../mixins"),
	{
		getRatio
	} = getApp();
Component({
	behaviors: [mixin],
	data: {
		currRate: 0,
		currIndex: 0
	},
	properties: {
		mf_data: Object
	},
	attached() {},
	detached() {},
	methods: {
		onScroll(t) {
			const {devicePixelRatio,screenWidth} = wx.getSystemInfoSync()
			const {
				scrollPaginate: e,
				style: a,
				scrollBar
			} = this.properties.mf_data, {
				scrollLeft: o,
				scrollWidth: r
			} = t.detail, c = r - a.width/750 *  screenWidth;
			this.setData({
				currRate: o / c,
				currIndex: Math.floor(o / (c / e.paginateNum))
			})
		},
		touchStart(t) {},
		touchMove() {},
		touchEnd(t) {}
	}
});
